/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tomica.datarespone;


import iaik.pkcs.pkcs11.wrapper.CK_INFO;


/**
 *
 * @author TccHtnn
 */
public class DataResponse_C_GetInfo {

    private long responseCodeBi;
    
    /*
     * Version of cryptoki
     */
    private byte cryptokiVersionMajorGi; /* Cryptoki interface ver */
    private byte cryptokiVersionMinorGi;

    private String manufacturerIDGi; 

    private long flagsGi; /* must be zero */

    private String libraryDescriptionGi;
    
    /*
     * Version of library
     */
    private byte libraryVersionMajorGi; /* version of library */
    private byte libraryVersionMinorGi;

    public DataResponse_C_GetInfo(long responseCodeBi, byte cryptokiVersionMajorGi, byte cryptokiVersionMinorGi, String manufacturerIDGi, long flagsGi, String libraryDescriptionGi, byte libraryVersionMajorGi, byte libraryVersionMinorGi) {
        this.responseCodeBi = responseCodeBi;
        this.cryptokiVersionMajorGi = cryptokiVersionMajorGi;
        this.cryptokiVersionMinorGi = cryptokiVersionMinorGi;
        this.manufacturerIDGi = manufacturerIDGi;
        this.flagsGi = flagsGi;
        this.libraryDescriptionGi = libraryDescriptionGi;
        this.libraryVersionMajorGi = libraryVersionMajorGi;
        this.libraryVersionMinorGi = libraryVersionMinorGi;
    }

    public DataResponse_C_GetInfo() {
    }

    public long getResponseCodeBi() {
        return responseCodeBi;
    }

    public void setResponseCodeBi(long responseCodeBi) {
        this.responseCodeBi = responseCodeBi;
    }

    public byte getCryptokiVersionMajorGi() {
        return cryptokiVersionMajorGi;
    }

    public void setCryptokiVersionMajorGi(byte cryptokiVersionMajorGi) {
        this.cryptokiVersionMajorGi = cryptokiVersionMajorGi;
    }

    public byte getCryptokiVersionMinorGi() {
        return cryptokiVersionMinorGi;
    }

    public void setCryptokiVersionMinorGi(byte cryptokiVersionMinorGi) {
        this.cryptokiVersionMinorGi = cryptokiVersionMinorGi;
    }

    public String getManufacturerIDGi() {
        return manufacturerIDGi;
    }

    public void setManufacturerIDGi(String manufacturerIDGi) {
        this.manufacturerIDGi = manufacturerIDGi;
    }

    public long getFlagsGi() {
        return flagsGi;
    }

    public void setFlagsGi(long flagsGi) {
        this.flagsGi = flagsGi;
    }

    public String getLibraryDescriptionGi() {
        return libraryDescriptionGi;
    }

    public void setLibraryDescriptionGi(String libraryDescriptionGi) {
        this.libraryDescriptionGi = libraryDescriptionGi;
    }

    public byte getLibraryVersionMajorGi() {
        return libraryVersionMajorGi;
    }

    public void setLibraryVersionMajorGi(byte libraryVersionMajorGi) {
        this.libraryVersionMajorGi = libraryVersionMajorGi;
    }

    public byte getLibraryVersionMinorGi() {
        return libraryVersionMinorGi;
    }

    public void setLibraryVersionMinorGi(byte libraryVersionMinorGi) {
        this.libraryVersionMinorGi = libraryVersionMinorGi;
    }

    
    
    public void setInfo(CK_INFO info) {
        setCryptokiVersionMajorGi(info.cryptokiVersion.major);
        setCryptokiVersionMinorGi(info.cryptokiVersion.minor);
        setLibraryVersionMajorGi(info.libraryVersion.major);
        setLibraryVersionMinorGi(info.libraryVersion.minor);
        setFlagsGi(info.flags);
        setManufacturerIDGi(new String(info.manufacturerID));
        setLibraryDescriptionGi(new String(info.libraryDescription));
    }

}
